package com.tiancheng.trade.settlement.service.settlement;

import com.tiancheng.trade.commom.core.data.PageInfo;
import com.tiancheng.trade.settlement.exception.BusinessException;
import com.tiancheng.trade.settlement.model.settlement.StatementAccount;
import com.tiancheng.trade.settlement.vo.settlement.admin.StatementAccountCreateVO;
import com.tiancheng.trade.settlement.vo.settlement.admin.StatementAccountQueryVO;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.List;

public interface IStatementAccountService {

    /**
     * 按ID查询对账函
     *
     * @param id
     * @return
     */
    StatementAccount findById(Long id);

    /**
     * 对账函查询列表
     *
     * @param statementAccountQueryVO
     * @return
     */
    PageInfo<StatementAccount> getStatementAccountPage(StatementAccountQueryVO statementAccountQueryVO);

    /**
     * 按条件查询当前是否有对账函信息
     *
     * @param statementAccountQueryVO
     * @return
     */
    List<StatementAccount> getStatementAccountList(StatementAccountQueryVO statementAccountQueryVO);

    /**
     * 生成对账函
     *
     * @param statementAccount
     * @return
     * @throws BusinessException
     */
    int addStatementAccount(StatementAccountCreateVO statementAccount) throws BusinessException;

    /**
     * 删除对账函
     *
     * @param codeList
     * @return
     * @throws BusinessException
     */
    int deleteStatementAccount(List<String> codeList) throws BusinessException;

    /**
     * 按对账函编号查询对账函
     *
     * @param statementCode
     * @return
     */
    StatementAccount findByStatementCode(String statementCode);

    /**
     * 生成对账函PDF文件
     *
     * @param statementCode
     * @return
     */
    void statementAccountPdf(String statementCode, HttpServletRequest request, HttpServletResponse response) throws Exception;


}
